# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=cffconvert
pkgver=2.0.0
_pkgorig=cff-converter-python
pkgrel=0
pkgdesc="Command line program to validate and convert CITATION.cff files"
url="https://github.com/citation-file-format/cff-converter-python"
arch="noarch"
license="Apache-2.0 license"
depends="python3 py3-click py3-jsonschema py3-pykwalify py3-requests py3-ruamel.yaml"
checkdepends="python3-dev py3-pytest py3-pytest-cov"
makedepends="py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/citation-file-format/cff-converter-python/archive/$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"
options="!check" # a minor portion of tests are failing

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
59a33af498a370390f2cfa78dc011d6488e7f71cb8d569213da74c7c61cfe641fffb6345f65d8b877287b4578fde238d93269c448dc19ddf5aaf0c9e314bf22b  cffconvert-2.0.0.tar.gz
"
